<template>
  <div class="home">
    <el-container style="height: 500px; border: 1px solid #eee">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu :default-openeds="['1', '4']">
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-house"></i>主页
            </template>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-s-opportunity"></i></i><router-link to="/home/Dan">单独的路由</router-link>
            </template>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title"><i class="el-icon-right"></i>外链</template>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-menu"></i><router-link to="/home/hao">二级菜单</router-link>
            </template>
              <el-menu-item-group>
                <template slot="title"><i class="el-icon-menu"></i><router-link to="/home/all">表格</router-link></template>
              </el-menu-item-group>
              <el-menu-item-group>
                <template slot="title"><i class="el-icon-right"></i>外链</template>
              </el-menu-item-group>
              <el-menu-item-group>
                <template slot="title"><i class="el-icon-document-copy"></i>三级菜单</template>
                 <el-menu-item index="1-1">选项1</el-menu-item>
                <el-menu-item index="1-2">选项2</el-menu-item>
              </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <!-- 主体 -->
      <router-view></router-view>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Home",
  components: {},
  data() {
    const item = {
      name: "小明",
      age: "2016-05-02",
      address: "哈哈哈哈",
    };
    return {
      tableData: Array(20).fill(item),
    };
  },
};
</script>
<style scope>
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
a{
  text-decoration: none;
  color: #333;
}
</style>